import { getAction, deleteDataAction, putAction, postAction, downFilePost, downFile } from '@/api/manage'
const serviceName = 'incident-server'
const getPageListByUnit = params => getAction(`${serviceName}/keyArea/getPageListByUnit`, params)
const createByFrame = params => postAction(`${serviceName}/keyArea/createByFrame`, params)
const updateByFrame = params => putAction(`${serviceName}/keyArea/updateByFrame`, params)
const deleteArea = params => deleteDataAction(`${serviceName}/keyArea/delete`, params)
const getDetailsById = params => getAction(`${serviceName}/keyArea/getDetailsById`, params)
const updateStatus = params => putAction(`${serviceName}/keyArea/updateStatus/`, params)
const getBaseStationByAreaId = params => getAction(`${serviceName}/keyArea/getBaseStationByAreaId`, params)
const exportXls = params => downFile(`${serviceName}/keyArea/exportXls`, params)
const getaddress = params => getAction(`http://10.1.3.87:8010/hainan/mapget/getaddress`, params)
/**------------告警动态----------------**/

export {
  getPageListByUnit,
  createByFrame,
  updateByFrame,
  deleteArea,
  getDetailsById,
  updateStatus,
  getBaseStationByAreaId,
  exportXls,
  getaddress
}
